/**
 * <p>Title: Snake</p>
 * <p>Copyright: (C) 2011 Gavin's Snake project. Licensed under the Apache License, Version 2.0 (the "License")</p>
 * @author Gavin
 */

package com.deaboway.snake.util;

public class Log{
    private static final int FATAL = 0;
    private static final int ERROR = 1;
    private static final int WARN =  2;
    private static final int INFO =  3;
    private static final int DEBUG = 4;
        
    private static int LOG_LEVEL = INFO;
    
    public static void info(String string){
        if(LOG_LEVEL >= INFO){
            System.out.println("[Deaboway][ INFO] " + string);
        }
    }

    public static void debug(String string){
        if(LOG_LEVEL >= DEBUG){
            System.out.println("[Deaboway][DEBUG] " + string);
        }
    }

    public static void warn(String string){
        if(LOG_LEVEL >= WARN){
            System.out.println("[Deaboway][ WARN] " + string);
        }
    }

    public static void error(String string){
        if(LOG_LEVEL >= ERROR){
            System.out.println("[Deaboway][ERROR] " + string);
        }
    }

    public static void fatal(String string){
        if(LOG_LEVEL >= FATAL){
            System.out.println("[Deaboway][FATAL] " + string);
        }
    }
}